﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Messaging;

namespace MessageQueues.MSMQ.Interface
{
    /// <summary>
    /// 队列管理接口，主要定义的是管理队列的方法
    /// </summary>
    public interface IMessageQueueManage : IMessageQueue, IDisposable
    {
        /// <summary>
        /// 验证队列是否存在
        /// </summary>        
        /// <returns>验证结果</returns>
        bool Exists();

        /// <summary>
        /// 创建队列
        /// </summary>
        /// <param name="type">队列类型(默认是专用队列)</param>
        /// <returns>队列对象</returns>
        MessageQueue Create(QueueType type = QueueType.PrivateQueue);

        /// <summary>
        /// 删除队列
        /// </summary>
        void Delete();
    }
}
